From: Jonas Dreßler Date: Fri, 18 Feb 2022 13:13:59 +0000 (+0100) Subject: parentalControlsManager: Be less verbose on the logs X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~516^2^2~67 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8a1c7ce5907ed076f7452f00cfc10947d7817bb1;p=gnome-shell.git parentalControlsManager: Be less verbose on the logs There's a few things that are really unncessary to log without any debugging enabled, for example "Getting parental controls for user", so remove that. Other things can be useful, so use console.debug() to log those. Especially the warning in showAppInfo() we don't want log by default as it spills tons of messages during shell startup (the async initialization of the malcontent manager takes some time). While at it, also make the !HAVE_MALCONTENT message a bit more accurate. Part-of: --- diff --git a/js/misc/parentalControlsManager.js b/js/misc/parentalControlsManager.js index 092721133..e2192caea 100644 --- a/js/misc/parentalControlsManager.js +++ b/js/misc/parentalControlsManager.js @@ -65,13 +65,12 @@ var ParentalControlsManager = GObject.registerClass({ async _initializeManager() { if (!HAVE_MALCONTENT) { - log('Skipping parental controls support as it’s disabled'); + console.debug('Skipping parental controls support, malcontent not found'); this._initialized = true; this.emit('app-filter-changed'); return; } - log(`Getting parental controls for user ${Shell.util_get_uid()}`); try { const connection = await Gio.DBus.get(Gio.BusType.SYSTEM, null); this._manager = new Malcontent.Manager({ connection }); @@ -81,7 +80,7 @@ var ParentalControlsManager = GObject.registerClass({ null); } catch (e) { if (e.matches(Malcontent.ManagerError, Malcontent.ManagerError.DISABLED)) { - log('Parental controls globally disabled'); + console.debug('Parental controls globally disabled'); this._disabled = true; } else { logError(e, 'Failed to get parental controls settings'); @@ -137,7 +136,7 @@ var ParentalControlsManager = GObject.registerClass({ // Have we finished initialising yet? if (!this.initialized) { - log(`Warning: Hiding app because parental controls not yet initialised: ${appInfo.get_id()}`); + console.debug(`Hiding app because parental controls not yet initialised: ${appInfo.get_id()}`); return false; }